<template>
  <div v-html="str">
    <div ref="ffffff"></div>
  </div>
  <!-- 666 -->
</template>

<script>
export default {
  name: "Pcpay",
  data() {
    return {
      str: "",
    };
  },
  methods: {
    async init() {
      await this.$store.dispatch("getpcPay", {});
      this.str = this.$store.state.zhifubao.html;
      this.str = this.str.replace(
        /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
        ""
      );
      console.log(this.str);
    },
  },
  created() {
    this.init();
    console.log(this);
    this.$nextTick(() => {
      var eleScript = document.createElement("script");
      eleScript.innerHTML = "document.forms[0].submit();";
      this.$refs.ffffff.append(eleScript);
    });
  },
};
</script>

<style>
</style>